﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<eCRAM.WebSite.Models.ParameterModel>" %>
<%@ Import Namespace="eCRAM.WebSite.Models" %>
<%@ Import Namespace="eCRAM.WebSite.Tools" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	eCram - Modifier un paramètre
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Modifier un paramètre</h2>

    <% using (Html.BeginForm("ValidateParameter", "ReferenceData"))
       {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Paramètre</legend>
            
            <%: Html.HiddenFor(model => model.Id) %>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Name) %>
            </div>
            <div class="editor-field">
                <%: Html.ReadOnlyTextBoxFor(model => model.Name, "Name") %>
                <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>

             <div class="editor-label">
                <%: Html.LabelFor(model => model.Description) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Description)%>
                <%: Html.ValidationMessageFor(model => model.Description)%>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Value) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Value) %>
                <%: Html.ValidationMessageFor(model => model.Value) %>
            </div>
            
            <p>
                <input type="submit" value="Modifier" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Retour", "SelectDataType", new {DataType = (int)EnumDataType.Parametres}) %>
    </div>

</asp:Content>

